import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

// 视频 - 管理员
const videoAdminIndex = () => import('@/components/video/admin/index.vue');
// 视频 - 用户
const upload = () => import('@/components/video/user/upload');
const videoHome = () => import('@/view/VideoHome');
const videoIndex = () => import('@/components/video/user/index');
const playVideo = () => import('@/view/playVideo');
const userCore = () => import('@/components/video/user/userCore');

// 图片 - 管理员
const imageAdminIndex = () => import('@/components/pic/admin/index.vue');
// 图片 - 用户
const picIndex = () => import('@/components/pic/user/index');
const picHome = () => import('@/components/pic/user/picHome');
const picList = () => import('@/components/pic/user/picList');


export default new Router({
  routes: [
    {
      path: '/',
      // redirect: '/imageAdminIndex' // 图片 - 管理端首页
      // redirect: '/picIndex'  // 图片 - 用户模块
      // redirect: '/videoAdminIndex' // 视频 - 管理端
      // redirect: '/videoIndex' // 视频 - 用户端首页
      redirect: '/upload'
    },
    // Oracle
    {
      path: '/upload',
      name: 'upload',
      component: upload
    },
    {
      path: '/videoAdminIndex',
      name: 'videoAdminIndex',
      component:videoAdminIndex 
    },
    // 视频 - 用户
    {
      path: '/videohome',
      name: 'videoHome',
      component: videoHome
    },
    {
      path: '/videoIndex',
      name: 'videoIndex',
      component: videoIndex
    },
    // 图片 - 管理员
    {
      path: '/imageAdminIndex',
      name: 'imageAdminIndex',
      component: imageAdminIndex
    },
    // 图片 - 用户
    {
      path: '/playVideo',
      name: 'playVideo',
      component: playVideo
    },
    {
      path: '/picIndex',
      name: 'picIndex',
      component: picIndex
    },
    {
      path: '/picHome',
      name: 'picHome',
      component: picHome
    },
    {
      path: '/picList',
      name: 'picList',
      component: picList
    },
    {
      path: '/userCore',
      name: 'userCore',
      component: userCore
    }
  ]
})
